<template>
	<view class="page-container line-bg-container">
		<u-navbar bgColor="transparent" :placeholder="true" :autoBack="true" customClass="jc-navbar">
			<view slot="center" :class="['jcc-tit', tabIndex===1 ? 'jcc-tit-status' : '' ]">
				<text v-if="tabIndex===0">BMS控制</text>
				<view v-if="tabIndex===1" class="soft-container">
					<text>运行时间：</text>
					<text class="num">9999</text>
					<text>天</text>
					<text class="num">01</text>
					<text>时</text>
					<text class="num">01</text>
					<text>分</text>
				</view>
				<text v-if="tabIndex===2">保存应用参数</text>
			</view>
		</u-navbar>
	<!-- 	<view class="soft-container" v-show="tabIndex===1">
			<view>
				<text>系统运行时间:</text>
				<text class="num">9999</text>
				<text>天</text>
				<text class="num">01</text>
				<text>时</text>
				<text class="num">01</text>
				<text>分</text>
			</view>
		</view> -->
		<view :class="['content-container', tabIndex===1 ? 'status-container' : '']">
			<view v-show="tabIndex===0" class="p-mode-wrapper">
				<view class="p-mode bms-setting">
					<u-collapse>
						<u-collapse-item title="管理员密码" :clickable="false">
							<u-row justify="space-between">
								<u-col span="10">
									<u--input type="number" placeholder="(请输入密码，如123456)" border="none" v-model="value"></u--input>
								</u-col>
								<u-col span="2">
									<u-icon size="18" name="setting" @click="setPwd"></u-icon>
								</u-col>
							</u-row>
						</u-collapse-item>
					</u-collapse>
					<u-cell title="升级固件" @click="showPopUp" :isLink="true" arrow-direction="right">
					</u-cell>
					<u-cell title="重启系统">
						<u-switch :space="3" slot="right-icon" inactiveColor="#eeeeee"
							activeColor="linear-gradient(to right, #00107d , #8acbf1)" v-model="checked"></u-switch>
					</u-cell>
					<u-cell title="强制放电管开关">
						<u-switch :space="3" slot="right-icon" inactiveColor="#eeeeee"
							activeColor="linear-gradient(to right, #00107d , #8acbf1)" v-model="checked"></u-switch>
					</u-cell>
					<u-cell title="强制充电管开关">
						<u-switch :space="3" slot="right-icon" inactiveColor="#eeeeee"
							activeColor="linear-gradient(to right, #00107d , #8acbf1)" v-model="checked"></u-switch>
					</u-cell>
					<u-cell title="均衡开关">
						<u-switch :space="3" slot="right-icon" inactiveColor="#eeeeee"
							activeColor="linear-gradient(to right, #00107d , #8acbf1)" v-model="checked"></u-switch>
					</u-cell>
					<u-cell title="电流归零">
						<u-switch :space="3" slot="right-icon" inactiveColor="#eeeeee"
							activeColor="linear-gradient(to right, #00107d , #8acbf1)" v-model="checked"></u-switch>
					</u-cell>
					<u-cell title="电加热开关">
						<u-switch :space="3" slot="right-icon" inactiveColor="#eeeeee"
							activeColor="linear-gradient(to right, #00107d , #8acbf1)" v-model="checked"></u-switch>
					</u-cell>	
					<u-cell title="专用充电器">
						<u-switch :space="3" slot="right-icon" inactiveColor="#eeeeee"
							activeColor="linear-gradient(to right, #00107d , #8acbf1)" v-model="checked"></u-switch>
					</u-cell>
					<u-cell title="屏蔽温度探头">
						<u-switch :space="3" slot="right-icon" inactiveColor="#eeeeee"
							activeColor="linear-gradient(to right, #00107d , #8acbf1)" v-model="checked"></u-switch>
					</u-cell>
					<u-cell title="恢复出厂值">
						<u-switch :space="3" slot="right-icon" inactiveColor="#eeeeee"
							activeColor="linear-gradient(to right, #00107d , #8acbf1)" v-model="checked"></u-switch>
					</u-cell>
				</view>
				<view class="m-type-item" style="margin-top: 50rpx;">
					<image src="../../static/img/shutdown.png" mode="widthFix"></image>
					<text>关闭系统</text>
				</view>
			</view>
			<view v-show="tabIndex===1" class="p-mode-wrapper p-mode-status">
				   <u-row justify="space-between">
						<u-col span="6">
							<view class="s-mode">
								<view class="label">工作状态:</view>
								<view class="sg-value">压差均衡</view>
							</view>
						</u-col>
						<u-col span="6">
							<view class="s-mode flex-end">
								<image class="fresh" src="../../static/img/icon-fresh.png" mode="widthFix"></image>
								<view class="btn" @click="navToLogs">系统日志</view>
							</view>
						</u-col>
					</u-row>
					 <u-row justify="space-between">
						<u-col span="6">
							<cube-big :ratio="35" :current="current"/>
						</u-col>
						<u-col span="6">
							<view class="s-big-mode">
									<text class="num">81.82</text>
									<text class="iconfont icon-dianya1"></text>
							</view>
							<view class="s-big-mode">
									<text class="num">-19.3</text>
									<text class="iconfont icon-dianya"></text>
							</view>
						</u-col>
					</u-row>
					
					<u-row justify="space-between">
						<u-col span="6">
							<view class="s-mode">
								<view class="label">电池容量:</view>
								<view class="sg-value deg-value">150</view>
								<view class="deg">Ah</view>
							</view>
						</u-col>
						<u-col span="6">
							<view class="s-mode s-mode-center">
								<view class="label">放电管</view>
								<view class="value">
									<u-switch disabled :space="2" :size="18" slot="right-icon" inactiveColor="#eeeeee"
										activeColor="linear-gradient(to right, #00107d , #8acbf1)"
										v-model="checked"></u-switch>
								</view>
							</view>
						</u-col>
					</u-row>
					
					<u-row justify="space-between">
						<u-col span="6">
							<view class="s-mode">
								<view class="label">剩余容量:</view>
								<view class="sg-value deg-value">95</view>
								<view class="deg">Ah</view>
							</view>
						</u-col>
						<u-col span="6">
							<view class="s-mode s-mode-center">
								<view class="label">充电管</view>
								<view class="value">
									<u-switch disabled :space="2" :size="18"  slot="right-icon" inactiveColor="#eeeeee"
										activeColor="linear-gradient(to right, #00107d , #8acbf1)"
										v-model="checked"></u-switch>
								</view>
							</view>
						</u-col>
					</u-row>
					
					<u-row justify="space-between">
						<u-col span="6">
							<view class="s-mode">
								<view class="label">加热管</view>
								<view class="value">
									<u-switch disabled :space="2" :size="18" slot="right-icon" inactiveColor="#eeeeee"
										activeColor="linear-gradient(to right, #00107d , #8acbf1)"
										v-model="checked"></u-switch>
								</view>
							</view>
						</u-col>
						<u-col span="6">
							<view class="s-mode s-mode-center">
								<view class="label">继电器</view>
								<view class="value">
									<u-switch disabled :space="2" :size="18" slot="right-icon" inactiveColor="#eeeeee"
										activeColor="linear-gradient(to right, #00107d , #8acbf1)"
										v-model="checked"></u-switch>
								</view>
							</view>
						</u-col>
					</u-row>
					<view class="u-row-progress">
						<u-row justify="space-between" align="top">
							<u-col span="6">
								<view class="s-mode">
									<view class="label">主动均衡</view>
									<view class="value">
										<u-switch disabled :space="2" :size="18" slot="right-icon" inactiveColor="#eeeeee"
											activeColor="linear-gradient(to right, #00107d , #8acbf1)"
											v-model="checked"></u-switch>
									</view>
								</view>
							</u-col>
							<u-col span="6">
								<view class="s-progress-mode">
										<u-line-progress :percentage="60" :showText="false" :height="18" activeColor="rgba(0,0,0,0)"></u-line-progress>
										<view class="progress-val">
											3A
										</view>
								</view>
							</u-col>
						</u-row>
					</view>
				
				<view class="u-border-top">
					<view class="r-container">
					    <!-- <u-row gutter="5"> -->
					    <u-row>
					      <u-col span="1" v-for="(item, index) in smallCbList" :key="index">
					        <view class="r-item">
								<!-- {{item.value}} -->
								<cube-small :key="index" :index="index + 1" :total="smallCbList.length" :value="item.value" :color="item.color" />
							</view>
					      </u-col>
					    </u-row>
					  </view>
			<!-- 		
					<view style="width: 100%; height: 135px; clear: both; padding-left: 8px;">
						<cube-small :key="1" :ratio="60" />
						<cube-small :key="2" :ratio="60" />
						<cube-small :key="3" :ratio="60" />
						<cube-small :key="4" :ratio="60" />
						<cube-small :key="5" :ratio="60" />
						<cube-small :key="6" :ratio="60" />
						<cube-small :key="7" :ratio="60" />
						<cube-small :key="8" :ratio="60" />
						<cube-small :key="9" :ratio="60" />
						<cube-small :key="10" :ratio="60" />
						<cube-small :key="11" :ratio="60" />
						<cube-small :key="12" :ratio="60" />
					</view> -->
				</view>
				
				
				<u-row justify="space-between">
					<u-col span="4">
						<view class="s-small-mode">
							<view class="label">单体最高:</view>
							<view class="sg-value deg-value">3.752</view>
							<text class="iconfont icon-dianya1"></text>
						</view>
					</u-col>
					<u-col span="4">
						<view class="s-small-mode">
							<view class="label">单体最低:</view>
							<view class="sg-value deg-value">3.752</view>
							<text class="iconfont icon-dianya1"></text>
						</view>
					</u-col>
					<u-col span="4">
						<view class="s-small-mode">
							<view class="label">单体压差:</view>
							<view class="sg-value deg-value">3.752</view>
							<text class="iconfont icon-dianya1"></text>
						</view>
					</u-col>
				</u-row>
				
				
				
				<u-row justify="space-between">
					<u-col span="4">
						<view class="s-small-mode">
							<view class="label">电池温度:</view>
							<view class="sg-value deg-value">13</view>
							<text class="iconfont icon-sheshidu"></text>
						</view>
					</u-col>
					<u-col span="4">
						<view class="s-small-mode">
							<view class="label">MOS温度:</view>
							<view class="sg-value deg-value">3.752</view>
							<text class="iconfont icon-sheshidu"></text>
						</view>
					</u-col>
					<u-col span="4">
						<view class="s-small-mode">
							<view class="label">循环次数:</view>
							<view class="sg-value deg-value">13</view>
							<view class="deg">次</view>
						</view>
					</u-col>
				</u-row>
				<view class="ver u-border-top">
						<view>软件版本号:20241201</view>
						<view>硬件版本号:20241201</view>
				</view>
						
				
			</view>

			<view v-show="tabIndex===2">
				<view class="p-mode ble-info">
					<u-collapse>
						<u-collapse-item title="管理员密码" :clickable="false">
							<u-row justify="space-between">
								<u-col span="10">
									<u--input type="number" placeholder="(请输入密码，如123456)" border="none" v-model="value"></u--input>
								</u-col>
								<u-col span="2">
									<u-icon size="18" name="setting"></u-icon>
								</u-col>
							</u-row>
						</u-collapse-item>
					</u-collapse>
					<u-cell title="蓝牙ID">
						<view slot="value" class="u-slot-value-02 u-slot-ble-value">
							<u--input border="none" class="u-type-default" placeholder="(输入值)"
								v-model="bleId"></u--input>
							<u-icon size="18" name="setting"></u-icon>
						</view>
					</u-cell>
					
					
			<!-- 		
					<u-cell title="蓝牙ID">
						<view slot="value" class="u-slot-value-02">
							<u-row justify="space-between">
								<u-col span="10">
									<u--input type="number" border="none" class="u-type-default" placeholder="(输入值)"
										v-model="bleId"></u--input>
								</u-col>
								<u-col span="2">
									<u-icon size="18" name="setting"></u-icon>
								</u-col>
							</u-row>
						</view>
					</u-cell> -->
					<!-- <u-cell title="蓝牙ID" value="SCZF-007"></u-cell> -->
				</view>
				<view class="s-type">
					<u-row gutter="20" justify="space-arround">
						<u-col span="4">
							<view class="s-type-item">一锂三元</view>
						</u-col>
						<u-col span="4">
							<view class="s-type-item">一键铁锂</view>
						</u-col>
						<u-col span="4">
							<view class="s-type-item">一键钠电</view>
						</u-col>
					</u-row>
				</view>
				<view class="dev-setting">
					<u-collapse accordion :border="false">
						<u-collapse-item title="基本设置" :clickable="false">
							<view class="q-setting">
								<u-cell title="电池实际串数">
									<view slot="value" class="u-slot-value-01">
										<text>OS</text>
										<u--input type="number" border="none"   v-model="value"></u--input>
										<text>设置</text>
									</view>
								</u-cell>
								<u-cell title="电池实际容量">
									<view slot="value" class="u-slot-value-01">
										<text>OAH</text>
										<u--input type="number" border="none"   v-model="value"></u--input>
										<text>设置</text>
									</view>
								</u-cell>
								<u-cell title="过流保护延时">
									<view slot="value" class="u-slot-value-01">
										<text>OAH</text>
										<u--input type="number" border="none"   v-model="value"></u--input>
										<text>设置</text>
									</view>
								</u-cell>
								<u-cell title="瞬间过流保护">
									<view slot="value" class="u-slot-value-01">
										<text>OAH</text>
										<u--input type="number" border="none"   v-model="value"></u--input>
										<text>设置</text>
									</view>
								</u-cell>
								<u-collapse>
									<u-collapse-item title="修改管理员密码" :clickable="false">
										<u-row justify="space-between">
											<u-col span="10">
												<u--input type="number" placeholder="(请输入新密码，如123456)" border="none"
													v-model="value"></u--input>
											</u-col>
											<u-col span="2">
												<u-icon size="18" name="setting"></u-icon>
											</u-col>
										</u-row>
									</u-collapse-item>
								</u-collapse>
								<u-cell title="充满压差均衡">
									<u-switch :space="3" slot="right-icon" inactiveColor="#eeeeee"
										activeColor="linear-gradient(to right, #00107d , #8acbf1)"
										v-model="checked"></u-switch>
								</u-cell>
								<u-cell title="闲时压差均衡">
									<u-switch :space="3" slot="right-icon" inactiveColor="#eeeeee"
										activeColor="linear-gradient(to right, #00107d , #8acbf1)"
										v-model="checked"></u-switch>
								</u-cell>
								<u-cell title="闲时均衡触发">
									<view slot="value" class="u-slot-value-02">
										<u--input type="number" border="none" class="u-type-default" placeholder="(3.35)~(0.005)"
											v-model="value"></u--input>
										<text>设置</text>
									</view>
								</u-cell>
								<u-cell title="短路保护" :border="false">
									<u-switch :space="3" slot="right-icon" inactiveColor="#eeeeee"
										activeColor="linear-gradient(to right, #00107d , #8acbf1)"
										v-model="checked"></u-switch>
								</u-cell>
							</view>
						</u-collapse-item>
						<u-collapse-item title="电压电流设置" :clickable="false">

							<view class="q-setting">
								<u-cell title="单体欠压告警">
									<view slot="value" class="u-slot-value-02">
										<u--input type="number" border="none" class="u-type-default" placeholder="(输入值)"
											v-model="value"></u--input>
										<text>设置</text>
									</view>
								</u-cell>
								<u-cell title="单体欠压保护">
									<view slot="value" class="u-slot-value-02">
										<u--input type="number" border="none" class="u-type-default" placeholder="(输入值)"
											v-model="value"></u--input>
										<text>设置</text>
									</view>
								</u-cell>
								<u-cell title="单体欠压恢复">
									<view slot="value" class="u-slot-value-02">
										<u--input type="number" border="none" class="u-type-default" placeholder="(输入值)"
											v-model="value"></u--input>
										<text>设置</text>
									</view>
								</u-cell>
								<u-cell title="充电过流告警">
									<view slot="value" class="u-slot-value-02">
										<u--input type="number" border="none" class="u-type-default" placeholder="(输入值)"
											v-model="value"></u--input>
										<text>设置</text>
									</view>
								</u-cell>
								<u-cell title="充电过流保护">
									<view slot="value" class="u-slot-value-02">
										<u--input type="number" border="none" class="u-type-default" placeholder="(输入值)"
											v-model="value"></u--input>
										<text>设置</text>
									</view>
								</u-cell>
								<u-cell title="放电过流告警">
									<view slot="value" class="u-slot-value-02">
										<u--input type="number" border="none" class="u-type-default" placeholder="(输入值)"
											v-model="value"></u--input>
										<text>设置</text>
									</view>
								</u-cell>
								<u-cell title="放电过流保护">
									<view slot="value" class="u-slot-value-02">
										<u--input type="number" border="none" class="u-type-default" placeholder="(输入值)"
											v-model="value"></u--input>
										<text>设置</text>
									</view>
								</u-cell>
								<u-cell title="过流保护延时">
									<view slot="value" class="u-slot-value-02">
										<u--input type="number" border="none" class="u-type-default" placeholder="(输入值)"
											v-model="value"></u--input>
										<text>设置</text>
									</view>
								</u-cell>
								<u-cell title="瞬间过流保护" :border="false">
									<view slot="value" class="u-slot-value-02">
										<u--input type="number" border="none" class="u-type-default" placeholder="(输入值)"
											v-model="value"></u--input>
										<text>设置</text>
									</view>
								</u-cell>
								<u-cell title="单体过压告警">
									<view slot="value" class="u-slot-value-02">
										<u--input type="number" border="none" class="u-type-default" placeholder="(输入值)"
											v-model="value"></u--input>
										<text>设置</text>
									</view>
								</u-cell>
								<u-cell title="单体过压保护">
									<view slot="value" class="u-slot-value-02">
										<u--input type="number" border="none" class="u-type-default" placeholder="(输入值)"
											v-model="value"></u--input>
										<text>设置</text>
									</view>
								</u-cell>
								<u-cell title="单体过压恢复">
									<view slot="value" class="u-slot-value-02">
										<u--input type="number" border="none" class="u-type-default" placeholder="(输入值)"
											v-model="value"></u--input>
										<text>设置</text>
									</view>
								</u-cell>
							</view>
						</u-collapse-item>
						<u-collapse-item title="温度加热设置" :clickable="false">
							<view class="q-setting">
								<u-cell title="电池低温保护(°C)">
									<view slot="value" class="u-slot-value-02">
										<u--input type="number" border="none" class="u-type-default" placeholder="(输入值)"
											v-model="value"></u--input>
										<text>设置</text>
									</view>
								</u-cell>
								<u-cell title="电池高温保护(°C)">
									<view slot="value" class="u-slot-value-02">
										<u--input type="number" border="none" class="u-type-default" placeholder="(输入值)"
											v-model="value"></u--input>
										<text>设置</text>
									</view>
								</u-cell>
								<u-cell title="加热目标温度(°C)">
									<view slot="value" class="u-slot-value-02">
										<u--input type="number" border="none" class="u-type-default" placeholder="(输入值)"
											v-model="value"></u--input>
										<text>设置</text>
									</view>
								</u-cell>
								<u-cell title="触发开启温度(°C)">
									<view slot="value" class="u-slot-value-02">
										<u--input type="number" border="none" class="u-type-default" placeholder="(输入值)"
											v-model="value"></u--input>
										<text>设置</text>
									</view>
								</u-cell>
								<u-cell title="单体电压限制(V)">
									<view slot="value" class="u-slot-value-02">
										<u--input type="number" border="none" class="u-type-default" placeholder="(输入值)"
											v-model="value"></u--input>
										<text>设置</text>
									</view>
								</u-cell>
								<u-cell title="放电过流告警">
									<view slot="value" class="u-slot-value-02">
										<u--input type="number" border="none" class="u-type-default" placeholder="(输入值)"
											v-model="value"></u--input>
										<text>设置</text>
									</view>
								</u-cell>


								<u-cell title="模式一(电流触发加热)">
									<u-switch :space="3" slot="right-icon" inactiveColor="#eeeeee"
										activeColor="linear-gradient(to right, #00107d , #8acbf1)"
										v-model="checked"></u-switch>
								</u-cell>
								<u-cell title="模式二(每天重复加热)">
									<u-switch :space="3" slot="right-icon" inactiveColor="#eeeeee"
										activeColor="linear-gradient(to right, #00107d , #8acbf1)"
										v-model="checked"></u-switch>
								</u-cell>
								<u-cell title="时段一">
									<view slot="value" class="u-slot-value-02">
										<u--input type="number" border="none" class="u-type-default" placeholder="(9:00)~(18:00)"
											v-model="value"></u--input>
										<text>设置</text>
									</view>
								</u-cell>
								<u-cell title="时段二">
									<view slot="value" class="u-slot-value-02">
										<u--input type="number" border="none" class="u-type-default" placeholder="(9:00)~(18:00)"
											v-model="value"></u--input>
										<text>设置</text>
									</view>
								</u-cell>

								<u-cell title="模式三(单次恒温加热)">
									<u-switch :space="3" slot="right-icon" inactiveColor="#eeeeee"
										activeColor="linear-gradient(to right, #00107d , #8acbf1)"
										v-model="checked"></u-switch>
								</u-cell>
								<u-cell title="单次加热时间(分)">
									<view slot="value" class="u-slot-value-02">
										<u--input type="number" border="none" class="u-type-default" placeholder="(输入值)"
											v-model="value"></u--input>
										<text>设置</text>
									</view>
								</u-cell>
								<u-cell title="模式四(强制加热)">
									<u-switch :space="3" slot="right-icon" inactiveColor="#eeeeee"
										activeColor="linear-gradient(to right, #00107d , #8acbf1)"
										v-model="checked"></u-switch>
								</u-cell>
								<u-cell title="单次启动时间(分)" :border="false">
									<view slot="value" class="u-slot-value-02">
										<u--input type="number" border="none" class="u-type-default" placeholder="(输入值)"
											v-model="value"></u--input>
										<text>设置</text>
									</view>
								</u-cell>
							</view>
						</u-collapse-item>
						<u-collapse-item title="高级设置" :clickable="false">
							<view class="q-setting">
								<u-cell title="自动关机计时(分)">
									<view slot="value" class="u-slot-value-02">
										<u--input type="number" border="none" class="u-type-default" placeholder="(输入值)"
											v-model="value"></u--input>
										<text>设置</text>
									</view>
								</u-cell>
								<u-cell title="电流校准(倍)">
									<view slot="value" class="u-slot-value-02">
										<u--input type="number" border="none" class="u-type-default" placeholder="(输入值)"
											v-model="value"></u--input>
										<text>设置</text>
									</view>
								</u-cell>
								<u-cell title="电压校准(V)">
									<view slot="value" class="u-slot-value-02">
										<u--input type="number" border="none" class="u-type-default" placeholder="(输入值)"
											v-model="value"></u--input>
										<text>设置</text>
									</view>
								</u-cell>
								<u-cell title="CAN协议">
									<view slot="value" class="u-slot-value-02">
										<u--input type="number" border="none" class="u-type-default" placeholder="(输入值)"
											v-model="value"></u--input>
										<text>设置</text>
									</view>
								</u-cell>
								<u-cell title="继电器省电(分)">
									<view slot="value" class="u-slot-value-02">
										<u--input type="number" border="none" class="u-type-default" placeholder="(输入值)"
											v-model="value"></u--input>
										<text>设置</text>
									</view>
								</u-cell>
								<u-cell title="电压突变保护">
									<view slot="value" class="u-slot-value-02">
										<u--input type="number" border="none" class="u-type-default" placeholder="(输入值)"
											v-model="value"></u--input>
										<text>设置</text>
									</view>
								</u-cell>
								<u-cell title="CAN波特率" :border="false">
									<view slot="value" class="u-slot-value-01">
										<text>250</text>
										<u--input type="number" border="none" v-model="value"></u--input>
										<text>设置</text>
									</view>
								</u-cell>
							</view>
						</u-collapse-item>
						<u-collapse-item title="连接内阻补偿" :clickable="false">
							<view class="q-setting">
								<u-cell title="连接内阻1">
									<view slot="value" class="u-slot-value-01">
										<text>OMR</text>
										<u--input type="number" border="none"   v-model="value"></u--input>
										<text>设置</text>
									</view>
								</u-cell>
								<u-cell title="连接内阻2">
									<view slot="value" class="u-slot-value-01">
										<text>OMR</text>
										<u--input type="number" border="none"   v-model="value"></u--input>
										<text>设置</text>
									</view>
								</u-cell>
								<u-cell title="连接内阻3">
									<view slot="value" class="u-slot-value-01">
										<text>OMR</text>
										<u--input type="number" border="none"   v-model="value"></u--input>
										<text>设置</text>
									</view>
								</u-cell>
								<u-cell title="连接内阻4">
									<view slot="value" class="u-slot-value-01">
										<text>OMR</text>
										<u--input type="number" border="none"   v-model="value"></u--input>
										<text>设置</text>
									</view>
								</u-cell>
								<u-cell title="连接内阻5" :border="false">
									<view slot="value" class="u-slot-value-01">
										<text>OMR</text>
										<u--input type="number" border="none"   v-model="value"></u--input>
										<text>设置</text>
									</view>
								</u-cell>
							</view>
						</u-collapse-item>
					</u-collapse>
				</view>
				<view class="m-type-item" style="margin-top: 30rpx;">
					<text>一键保存</text>
				</view>
			</view>
		</view>
		
		

		<u-tabbar activeColor="#231815" inactiveColor="#7e7f80" :value="tabIndex" @change="onChange" :fixed="true" :border="false" :placeholder="true" :safeAreaInsetBottom="true">
			<u-tabbar-item text="BMS控制">
				<image
							class="u-page__item__slot-icon"
							slot="active-icon"
							src="../../static/img/bms.png"
						></image>
						<image
							class="u-page__item__slot-icon"
							slot="inactive-icon"
							src="../../static/img/bms-def.png"
						></image>
						
			</u-tabbar-item>
			<u-tabbar-item text="电池状态">
				<image
							class="u-page__item__slot-icon"
							slot="active-icon"
							src="../../static/img/status.png"
						></image>
						<image
							class="u-page__item__slot-icon"
							slot="inactive-icon"
							src="../../static/img/status-def.png"
						></image>
			</u-tabbar-item>
			<u-tabbar-item text="参数配置">
				<image
							class="u-page__item__slot-icon"
							slot="active-icon"
							src="../../static/img/setting.png"
						></image>
						<image
							class="u-page__item__slot-icon"
							slot="inactive-icon"
							src="../../static/img/setting-def.png"
						></image>
			</u-tabbar-item>
		</u-tabbar>


		<u-popup :show="show" :closeOnClickOverlay="true" mode="center" :round="10" @close="show = false" @open="open">
			<view class="ota-step-container">
				<view class="ota-step">
					<image class="icon" src="../../static/img/icon-radio.png" mode="widthFix"></image>
					<view class="ota-step-cnt">
						<view class="ota-step-tit">
							下载固件
						</view>
						<view class="ota-step-tip">
							<u--text type="primary" text="点击此处"></u--text>
							<tetx>下载最新固件版本</tetx>
						</view>
						<view class="ota-step-process">
							<u-line-progress :percentage="30" :height="10"
								activeColor="rgba(0,0,0,0)"></u-line-progress>
						</view>
					</view>
				</view>
				<view class="ota-step">
					<image class="icon" src="../../static/img/icon-radio.png" mode="widthFix"></image>
					<view class="ota-step-cnt">
						<view class="ota-step-tit">
							升级固件
						</view>
						<view class="ota-step-tip">
							<u--text type="primary" text="点击此处"></u--text>
							<tetx>下载最新固件版本</tetx>
						</view>
						<view class="ota-step-process">
							<u-line-progress :percentage="60" :height="10"
								activeColor="rgba(0,0,0,0)"></u-line-progress>
						</view>
					</view>
				</view>
			</view>
		</u-popup>
		<u-toast ref="uToast"></u-toast>
		
		
		
	</view>
</template>

<script>
	import cubeBig from '../../components/cube-big/cube-big.vue'
	import cubeSmall from '../../components/cube-small/cube-small.vue'
	export default {
		data() {
			return {
				tabIndex: 1,
				checked: true,
				show: false,
				value: '',
				current: 16,
				bleId: 'SCZF-007',
				smallCbList: [
					{value: 3.12},
					{value: 3.45},
					{value: 3.34},
					{value: 3.12},
					{value: 3.22},
					{value: 3.10},
					{value: 3.45},
					{value: 3.21},
					{value: 3.13},
					{value: 3.52},
					{value: 3.50},
					{value: 3.56},
					{value: 3.45},
					{value: 3.52},
					{value: 3.34},
					{value: 3.12},
					{value: 3.22},
					{value: 3.10},
					{value: 4.51},
					{value: 4.89, color: 'danger'},
					{value: 2.13, color: 'waring'},
					{value: 3.45},
					{value: 3.71},
					{value: 3.71},
				]
			}
		},
		components: {
			cubeBig,
			cubeSmall
		},
		onChange(name) {
			this.tabIndex = name
			
		},
		methods: {
			setPwd() {
				this.$refs.uToast.show({
					type: 'default',
					message: "密码错误",
				})
			},
			navToLogs() {
				uni.navigateTo({
					url: '/pages/log/log',
					success: res => {},
					fail: () => {},
					complete: () => {}
				});
			},
			onChange(name) {
				this.tabIndex = name
				this.scrollToTop()	
			},
			scrollToTop() {
			      uni.pageScrollTo({
			        scrollTop: 0,
			        duration: 300 // 动画时长，默认300ms
			      });
			    },
			showPopUp() {
				this.show = true
			},
			open() {},
		}
	}
</script>

<style lang="scss">
	page {
		background: linear-gradient(to right, #00107d 0%, #8acbf1 100%);
	}

	.ota-step-container {
		width: 580rpx;
		padding: 80rpx 45rpx;
	}

	.ota-step {
		display: flex;
		color: #60686a;
		font-size: 14px;

		&:last-child {
			margin-top: 60rpx;
		}

		image.icon {
			width: 45rpx;
			height: 45rpx !important;
			flex: 0 0 45rpx;
		}

		.ota-step-cnt {
			flex: 1;
			padding-left: 30rpx;

			.ota-step-tit {
				font-size: 18px;
			}

			.ota-step-tip {
				margin-top: 20rpx;

				/deep/.u-text,
				/deep/.u-text__value {
					display: inline !important;
				}
			}

			.ota-step-process {
				margin-top: 50rpx;

				/deep/.u-line-progress__line {
					background: linear-gradient(to right, #00107d, #8acbf1) !important;
				}
			}
		}

	}

	.dev-setting {
		&>/deep/.u-collapse-item__content__text {
			padding: 0 !important;
		}

		&>/deep/.u-collapse {
			&>.u-collapse-item {
				margin-bottom: 20rpx;
				background: #fff;
				border-radius: 30rpx;
				padding: 0 30rpx;

				&>.u-collapse-item__content {
					position: relative;

					&::before {
						position: absolute;
						left: 0;
						right: 0;
						margin: 0;
						width: 100%;
						height: 1px;
						transform: scaleY(0.5);
						background-color: #d6d7d9;
						content: ' ';
					}
				}
			}
		}
	}

	.jcc-tit-status {
		flex: 1;
		padding-left: 45px;
	}
	.soft-container {
		font-size: 14px;
		// color: #fff;
		// width: 375rpx;
		// left: 215rpx;
		// top: 30px;
		// display: inline;
		// position: fixed;
		// z-index: 10000;
		// line-height: 16px;
		.num {
			padding: 2px 4px;
			line-height: 1;
			// background: #fff;
			// border-radius: 2px;
			color: #fff100;
		}
	}
	.status-container {
		background: #fff !important;
		padding-top: 15rpx;
	}
	.p-mode-status {
		.s-mode {
			width: 100%;
			display: inline-flex;
			align-items: center;
			font-size: 14px;
			color: #159f83;
			margin-top: 25rpx;
			&>view{
				display: inline;
			}
			.fresh {
				width: 52rpx;
				height: 40rpx;
			}
			.btn {
				display: inline-flex;
				align-items: center;
				justify-content: center;
				width: 160rpx;
				height: 50rpx;
				border-radius: 50rpx;
				margin-left: 15rpx;
				font-size: 14px;
				box-shadow: 2px 2px 5px #888888;
				color: #fff;
				background: linear-gradient(to right, #00107d, #8acbf1) !important;
			}
			.label {
				width: 140rpx;
				text-align: left;
			}
			.sg-value {
				display: inline-flex;
				align-items: center;
				justify-content: center;
				width: 150rpx;
				padding: 5rpx 0rpx;
				color: #fff;
				border-radius: 5px;
				margin-left: 15rpx;
				line-height: 1;
				background: linear-gradient(to right, #00107d, #8acbf1) !important;
			}
			.deg-value{
				width: 125rpx !important;
			}
			.deg {
				margin-left: 10rpx;
			}
			.u-switch {
				margin-left: 15rpx;
				// height: 18px !important;
				// /deep/.u-switch__node {
				// 	width: 12px !important;
				// 	height: 12px !important;
				// }
			}
			
		}
		.s-big-mode {
			width: 100%;
			color: #159f83;
			margin-top: 25rpx;
			text-align: right;
			.num {
				display: inline-flex;
				align-items: center;
				justify-content: center;
				font-size: 24px;
				width: 205rpx;
				height: 70rpx;
				border-radius: 5px;
				color: #fff;
				background: linear-gradient(to right, #00107d, #8acbf1) !important;
			}
			.iconfont {
				font-size: 26px;
				margin-left: 15rpx;
			}
		}
		.s-small-mode {
			width: 100%;
			display: inline-flex;
			align-items: center;
			font-size: 12px;
			color: #159f83;
			margin-top: 25rpx;
			&>view{
				display: inline;
			}
			.sg-value {
				display: inline-flex;
				align-items: center;
				justify-content: center;
				width: 70rpx;
				padding: 5rpx 0rpx;
				color: #fff;
				border-radius: 5px;
				margin-left: 0rpx;
				line-height: 1;
				background: linear-gradient(to right, #00107d, #8acbf1) !important;
			}
		}
		.s-progress-mode {
			width: 100%;
			font-size: 12px;
			color: #159f83;
			margin-top: 30rpx;
			padding-bottom: 15rpx;
			display: flex;
			/deep/.u-line-progress{
				margin: 0 5px;
			}
			/deep/.u-line-progress__line {
				background: linear-gradient(to right, #00107d, #8acbf1) !important;
				border-top-right-radius: 0 !important;
				border-bottom-right-radius: 0 !important;
			}
			
			.progress-val {
				margin-left: 10rpx;
				display: inline-flex;
				align-items: center;
				justify-content: center;
				width: 18px;
				height: 18px;
				color: #fff;
				border-radius: 5px;
				background: linear-gradient(to right, #00107d, #8acbf1) !important;
				font-size: 12px;
			}
		}
	}
	
	.u-row-progress {
		.u-row{
			
		}
	}
	
	.flex-end {
		justify-content: flex-end !important;
	}
	.s-mode-center {
		justify-content: flex-end !important;
		.label{
			width: auto !important;
		}
	}
	.r-container {
		padding: 10px;
		.u-row{
			 flex-wrap: wrap;
			 margin-left: -5px;
			 .r-item {
				 position: relative;
				 margin: 15rpx 0;
			 }
		}
	}
	.ver {
		font-size: 14px;
		color: #7c7c7c;
		padding: 10px;
		margin-top: 10px;
		display: flex;
		align-items: center;
		justify-content: space-between;
	}
</style>